<%-- 
    Document   : myprofle
    Created on : Jun 19, 2012, 10:06:09 AM
    Author     : VANANH
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
<%@taglib prefix="rich" uri="http://richfaces.org/rich" %>
<%@taglib prefix="a4j" uri="http://richfaces.org/a4j" %>
<html>
    <head>
        <script type="text/javascript" language="javascript" src="../scripts/jQuery/jquery.fancybox-1.3.4.pack.js"></script>
        <!-- -->
        <link rel="stylesheet" type="text/css" href="../css/popup.css"/>  
        <script type="text/javascript" language="javascript" src="../scripts/jQuery/kapi.js"></script>
        <script type="text/javascript" language="javascript" src="../scripts/jQuery/thickbox.js"></script>
        <link rel="stylesheet" type="text/css" href="../css/thickbox.css"/>
        <script type="text/javascript">
            $j(document).ready(function(){
                initThickBox('.thickbox');
            });
        </script>
    </head>
    <style>

        .list_content .contact{
            background: none repeat scroll 0 0 #E8E8E8;
            float: left;
            margin-bottom: 10px;
            margin-left: -5px;
            margin-top: 0 !important;
            overflow: hidden;
            padding: 4px;
            position: relative;
            width: 622px !important;
        }
        .list_content .contact-header{

            float: left;
            margin-bottom: 6px;
            margin-left: -4px;
            margin-top: -15px !important;
            overflow: hidden;
            padding: 4px;
            position: relative;
            width: -moz-available !important;
            z-index: 2;
        }

        .list_content .contact-pass .items{
            margin-top: 3px;
            width: 280px;
            float:left;
        }

        .list_content .contact-header .items{
            margin-top: 10px;
            width: 280px;
            float:left;
        }
        .list_content .contact .items{
            margin-top: 10px;
            width: 280px;
            float:left;
        }
        .list_content .contact .action{
            margin-top: 10px;
        }
        .list_content .contact-pass .action{
            margin-bottom: 3px;
            margin-top: 3px;
        }
        .list_content .items{
            margin-top: 10px;
            width: 500px;
        }
        .list_content .header{
            background-color: #566575;

            float: left;
            height: 30px;
            margin-bottom: 10px;
            margin-left: -4px;
            margin-top: -4px !important;
            width: 628px;
        }
        .list_content .action{
            margin-bottom: 7px;
        }
        .list_content .action label{

        }
        .list_content .action img{
            float: left;
            height: 15px;
            margin-right: 4px;
            width: 15px;
        }
        .list_content .header label{
            color: white;
            float: left;
            font-size: 13px;
            font-weight: bold;
            margin-left: 1px;
            margin-top: 6px;
            text-align: center;
        }
        .list_content .action-form{
            float:right;
            margin-right: 4px;
        }
        .list_content .contact .content-myprofile{
            margin-top: -8px;
        }
        .list_content .contact .content-myprofile .items{
            float: left;
            margin-top: 10px;
            width: 280px;
        }
        .list_content .items .action{
            margin-left: 108px;
        }
        .list_content .items label{
            float: left;
            margin-right: 3px;
            text-align: right;
            width: 100px;

        }
        .list_content .items span{
            font-size: 12px;
            font-weight: bold;
            color: #506172;
        }

        .comment-content {
            background: none repeat scroll 0 0 #CFCFCF;

            border: 1px solid #7F9FBE;
            float: left;
            margin-bottom: 10px;
            margin-left: 3px;
            margin-top: 0 !important;
            min-height: auto;
            overflow: hidden;
            padding: 4px;
            position: relative;
            width: 620 !important;
            z-index: 2;
        }

      .qa {
    float: left;
    margin-left: 23%;
   
    width: 50%;
}
        .edit_delete{
            margin-left: 582px;
            margin-top: 1px !important;
            position: relative;
        }
        .contact .profile-rigth{
            float: left;
            width: 280px;
            margin-bottom: 8px;
            margin-top: -19px
        }
        .contact .profile-rigth .items{
            width: 278px;
            float: left;
        }
        .contact .profile-rigth .items label{
            width: 100px;
        }
        .contact .profile-left{
            width: 280px;
            float: left;
            margin-bottom: 8px;
            margin-top: -19px
        }
        .contact .profile-left .items{
            width: 278px;
            float: left;

        }
        .contact .profile-left .items label{
            width: 100px;
        }
        .contact .contact-content{
            margin-bottom: 29px;
            margin-top: -15px;
        }
        .contact .contact-content .content-personal{
            float: left;
            margin-left: -6px;
            margin-top: 5px;
        }
        .contact .contact-content .content-personal .items{
            float: left;
            margin-bottom: 5px;
            margin-top: 16px;
            width: 166px;
        }
        .contact .contact-content .content-personal .items1{
            float: left;
            margin-left: -27px;
            margin-top: 16px;
            width: 118px;
        }
        .contact .contact-content .content-personal .items-action{
            float: left;
            margin-top: 16px;
            width: 36px;
        }
        .contact .contact-content .content-personal .items1 span{
            font-size: 12px;
            font-weight: bold;
            color: #506172;
        }
        .contact .contact-content .content-personal .items label{

            width: 75px;
        }
        .imgprofile{
            height: 100px !important;
            width: 100px !important;
        }
        .Signature{
            clear: both;
            margin-left: 5px;
        }
    </style>
    <body>
        <f:view>
            <a4j:form>
                <f:loadBundle basename="#{environmentSession.localizationSource}" var="locale"/>
                <h:outputText value="<div class='permission' lang='#{loginSession.right.MNU_FIL_VIE}'></div>" escape="false"/>
                <div id="content">

                    <div id="content_detail">
                        <div class="sidebar" style="width:7.3%;">                  
                            <div class="search_box1">
                                <h:outputLink  value="logo.jsp?pn100=#{loginSession.login.id}&page=logo4&type=ALL&table=M650&height=165px&width=410px&KeepThis=true&amp;TB_iframe=true&amp;modal=true" styleClass="thickbox">
                                    <h:graphicImage value="/DisplayImageServlet?pn100Id=#{loginSession.login.id}&pn100=N100" alt="" styleClass="imgprofile">

                                    </h:graphicImage>


                                </h:outputLink>
                            </div>
                        </div>
                        <div class="content_right qa">
                            <div style="float: left;" >
                                <div class="title">

                                </div>
                                <!-- Strart list Content -->
                                <div class="list_content comment-content">
                                    <div class="header"><label>&nbsp <h:outputText value="#{locale.login_info}"/> </label></div>
                                    <div class="contact-header">
                                        <div class="items">
                                            <label> <h:outputText value="#{locale.frist_lastname}"/>: </label>
                                            <span><h:outputText value="#{loginSession.login.firstName} #{loginSession.login.lastName}"/></span> 
                                        </div>

                                        <div class="items">
                                            <label> <h:outputText value="#{locale.login_name}"/>: </label>
                                            <span><h:outputText value="#{loginSession.login.userName}"/></span> 
                                        </div>
                                    </div>
                                    <div class="contact">
                                        <div class="items">
                                            <label> <h:outputText value="#{locale.password}"/>: </label>
                                            <span><h:outputText value="*********"/></span>

                                        </div>
                                        <div class="action">
                                            <h:outputLink  value="changePassword.jsp?pn100=#{loginSession.login.id}&height=150px&width=300px" styleClass="fancybox" id="fancybox1">
                                                (<h:outputText value="#{locale.update_pass}"/>)
                                            </h:outputLink>
                                        </div>
                                    </div>

                                    <div class="contact">
                                        <div class="action-form">
                                            <h:outputLink  value="changeprofile.jsp?pn100=#{loginSession.login.id}&height=275px&width=500px" styleClass="fancybox" id="fancybox2">
                                                <img src="../images/edit.png" alt="edit" title="edit" /> 
                                            </h:outputLink>
                                        </div>
                                        <div class="content-myprofile">
                                            <a4j:repeat value="#{Q100Bean.listTabQ100}" var="item">
                                                <div class="items">
                                                    <label> <h:outputText value="#{locale.currency}"/>: </label>
                                                    <span>
                                                        <span><h:outputText value="#{item.device}"/></span> 
                                                    </span> 
                                                </div>
                                                <div class="items">
                                                    <label> <h:outputText value="#{locale.format_date}"/>: </label>
                                                    <span>
                                                        <span><h:outputText value="#{item.qv116}"/></span> 
                                                    </span> 
                                                </div>
                                                <div class="items">
                                                    <label> <h:outputText value="#{locale.time_zone}"/>: </label>
                                                    <span>
                                                        <span><h:outputText value="#{item.qv114}"/></span> 
                                                    </span> 
                                                </div>
                                                <div class="items">
                                                    <label><h:outputText value="#{locale.language}"/>:</label>
                                                    <span><h:outputText value="#{item.qv115}"/></span> 
                                                </div>
                                            </a4j:repeat>
                                        </div>

                                    </div>
                                </div>
                                <div class="list_content comment-content">
                                    <div class="header">
                                        <label>&nbsp <h:outputText value="#{locale.contact_info}"/></label>
                                    </div>
                                    <div class="action">
                                        <h:outputLink  value="editContact.jsp?action=add&fn100A=#{loginSession.login.id}&table1=myprofile&height=380px&width=600px" styleClass="fancybox" id="fancybox3">
                                            <img src="../images/add_tab.png" alt="add" title="add"/> <label> <h:outputText value="#{locale.contact_info}"/> </label>
                                        </h:outputLink>
                                    </div> 

                                    <a4j:repeat value="#{Q100Bean.listAllN950ByIDofMyprofile}" var="item">
                                        <div class="contact">

                                            <div class="items edit_delete">
                                                <h:outputLink rendered="#{loginSession.right.FIL_CON_MOD}" value="editContact.jsp?action=edit&fn100E=#{item.ADRID}&pn950E=#{item.ADRNO}&table1=myprofile&height=380px&width=550px" styleClass="fancybox card_edit" id="fancybox4"  >
                                                    <img src="../images/edit.png" alt="edit" title="edit" />                                                    
                                                </h:outputLink>
                                                <h:outputLink rendered="#{loginSession.right.FIL_CON_DEL}" value="delete.jsp?id=#{item.ADRNO}&pn100C=#{item.ADRID}&flag=N950&table1=myprofile&height=150px&width=300px" styleClass="fancybox card_delete" id="fancybox5">
                                                    <img src="../images/delete_1.png" alt="delete" title="delete" />                                               
                                                </h:outputLink>


                                            </div>
                                            <div class="contact-content">
                                                <div class="profile-rigth">
                                                    <div class="items">
                                                        <label> <h:outputText value="#{locale.address}"/>: </label>
                                                        <span><h:outputText value="#{item.str1}"/></span> 
                                                    </div>
                                                    <div class="items">
                                                        <label> <h:outputText value="#{locale.ward}"/>: </label>
                                                        <span><h:outputText value="#{item.WARD}"/></span> 
                                                    </div>
                                                    <div class="items">
                                                        <label>  <h:outputText value="#{locale.district}"/>: </label>
                                                        <span><h:outputText value="#{item.DIST}"/></span> 
                                                    </div>
                                                    <div class="items">
                                                        <label> <h:outputText value="#{locale.city}"/>: </label>
                                                        <span><h:outputText value="#{item.CITY}"/></span> 
                                                    </div>
                                                    <div class="items">
                                                        <label> <h:outputText value="#{locale.email}"/>: </label>
                                                        <span><h:outputText value="#{item.EML1}"/></span> 
                                                    </div>
                                                </div>
                                                <div class="profile-left">
                                                    <div class="items">
                                                        <label> <h:outputText value="#{locale.tel}"/>: </label>
                                                        <span><h:outputText value="#{item.TEL1}"/></span>
                                                    </div>
                                                    <div class="items">
                                                        <label> <h:outputText value="#{locale.mobile}"/>: </label>
                                                        <span>
                                                            <span><h:outputText value="#{item.MOB1}"/></span> 
                                                        </span> 
                                                    </div>
                                                    <div class="items">
                                                        <label> <h:outputText value="#{locale.fax}"/>: </label>
                                                        <span>
                                                            <span><h:outputText value="#{item.FAX1}"/></span> 
                                                        </span> 
                                                    </div>
                                                    <div class="items">
                                                        <label> Spyke: </label>
                                                        <span>
                                                            <span><h:outputText value="#{item.EML2}"/></span> 
                                                        </span> 
                                                    </div>
                                                    <div class="items">
                                                        <label><h:outputText value="#{locale.yahoo}"/>:</label>
                                                        <span><h:outputText value="#{item.EML3}"/></span> 
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </a4j:repeat>

                                </div>

                                <div class="list_content comment-content">
                                    <div class="header">
                                        <label>&nbsp <h:outputText value="Danh sách Email "/></label>
                                    </div>
                                    <div class="action">
                                        <h:outputLink  value="changepasswordGoogle.jsp?actionQ000=add&idQ000=0&pn100Q000=#{item.FN100}&table1=myprofile&height=380px&width=600px" styleClass="fancybox" id="fancybox33">
                                            <img src="../images/add_tab.png" alt="add" title="add"/> <label> <h:outputText value="Thêm mới Email"/> </label>
                                        </h:outputLink>
                                    </div> 
                                    <a4j:repeat value="#{Q100Bean.listAllQ000ByIDofMyprofile}" var="item">
                                        <div class="contact" >

                                            <div class="items edit_delete">
                                                <h:outputLink  value="changepasswordGoogle.jsp?actionQ000=edit&idQ000=#{item.PQ000}&pn100Q000=#{item.FN100}&table1=myprofile&height=380px&width=550px" styleClass="fancybox card_edit" id="fancybox43"  >
                                                    <img src="../images/edit.png" alt="edit" title="edit" />                                                    
                                                </h:outputLink>
                                                <h:outputLink  value="delete.jsp?id=#{item.PQ000}&pn100C=#{item.FN100}&flag=Q000&table1=myprofile&height=150px&width=300px" styleClass="fancybox card_delete" id="fancybox5">
                                                    <img src="../images/delete_1.png" alt="delete" title="delete" />                                               
                                                </h:outputLink>

                                            </div>
                                            <div class="contact-content">
                                                <div class="profile-rigth">
                                                    <div class="items">
                                                        <label> <h:outputText value="Tên tài khoản"/>: </label>
                                                        <span><h:outputText value="#{item.QV001}"/></span> 
                                                    </div>

                                                </div>
                                                <div class="profile-left">
                                                    <div class="items">
                                                        <label> <h:outputText value="Mật Khẩu"/>: </label>
                                                        <span><h:outputText value="**************"/></span>
                                                    </div>

                                                </div>
                                            </div>
                                        </div>
                                    </a4j:repeat>            

                                </div>


                                <div class="list_content comment-content">
                                    <div class="header">
                                        <label>&nbsp <h:outputText value="Chữ ký thư gửi khách hàng"/></label>
                                    </div>
                                    <%--<div class="action">
                                        <h:outputLink  value="editContact.jsp?action=add&fn100A=#{loginSession.login.id}&table1=myprofile&height=380px&width=600px" styleClass="fancybox" id="fancybox33">
                                            <img src="../images/add_tab.png" alt="add" title="add"/> <label> <h:outputText value="#{locale.googleAccountName}"/> </label>
                                        </h:outputLink>
                                    </div> --%>

                                    <div class="contact" >

                                        <div class="items edit_delete">
                                            <h:outputLink rendered="#{loginSession.right.FIL_MAL_ASS}" value="editSignature.jsp?pn100=#{loginSession.login.id}&table1=myprofile&height=380px&width=550px" styleClass="fancybox card_edit" id="fancybox135"  >
                                                <img src="../images/edit.png" alt="edit" title="edit" />                                                    
                                            </h:outputLink>

                                        </div>
                                        <div class="contact-content">
                                            <div class="profile-rigth">
                                                <div class="items">
                                                    <label> <h:outputText value="Chữ ký điện tử"/>: </label>
                                                    <span class="Signature"><h:outputText value="#{loginSession.login.qv121}" escape="false"/> </span>
                                                </div>

                                            </div>

                                        </div>
                                    </div>

                                </div> 

                                <div class="list_content comment-content">
                                    <div class="header"> <label>&nbsp <h:outputText value="#{locale.person_info}"/> </label></div>
                                    <div class="action">
                                        <h:outputLink rendered="#{loginSession.right.FIL_PAS_CRE}" value="editPersonal.jsp?action=add&fn100A=#{loginSession.login.id}&table1=myprofile&height=300px&width=500px" styleClass="fancybox" id="fancybox6">
                                            <img src="../images/add_tab.png" alt="add" title="add" /><label> <h:outputText value="#{locale.person_info}"/> </label>
                                        </h:outputLink>
                                    </div> 
                                    <a4j:repeat value="#{Q100Bean.listAllN350ByIDofMyprofile}" var="item"> 
                                        <div class="contact">

                                            <div class="contact-content">
                                                <div class="content-personal">
                                                    <div class="items">
                                                        <label> <h:outputText value="#{locale.papers}"/>: </label>
                                                        <h:panelGroup rendered="#{item.NN355==1}"><span><h:outputText value="CMND"/></span></h:panelGroup>
                                                        <h:panelGroup rendered="#{item.NN355==2}"><span><h:outputText value="Passport"/></span> </h:panelGroup>
                                                    </div>
                                                    <div class="items1">
                                                        <label> <h:outputText value="#{locale.number}"/>: </label>
                                                        <span><h:outputText value="#{item.nv351}"/></span> 
                                                    </div>
                                                    <div class="items">
                                                        <label> <h:outputText value="#{locale.date_of_issue}"/>: </label>
                                                        <span><h:outputText value="#{item.nd352}"><f:convertDateTime pattern="dd/MM/yyyy"/></h:outputText></span> 
                                                    </div>
                                                    <div class="items">
                                                        <label> <h:outputText value="#{locale.closing_date}"/>: </label>
                                                        <span><h:outputText value="#{item.nd353}"><f:convertDateTime pattern="dd/MM/yyyy"/></h:outputText></span>
                                                    </div>
                                                    <div class="items-action">

                                                        <h:outputLink rendered="#{loginSession.right.FIL_PAS_MOD}" value="editPersonal.jsp?action=edit&fn100E=#{loginSession.login.id}&pn350E=#{item.PN350}&table1=myprofile&height=300px&width=500px" styleClass="fancybox" id="fancybox7">
                                                            <img src="../images/edit.png" alt="edit" title="edit"/>
                                                        </h:outputLink>
                                                        <h:outputLink rendered="#{loginSession.right.FIL_PAS_DEL}" value="delete.jsp?id=#{item.PN350}&pn100C=#{loginSession.login.id}&table1=myprofile&flag=N350&height=150px&width=300px" styleClass="fancybox" id="fancybox8">
                                                            <img src="../images/delete_1.png" alt="delete"  title="delete" />
                                                        </h:outputLink>
                                                    </div>
                                                </div>
                                            </div>

                                        </div>
                                    </a4j:repeat>

                                </div>
                                <!-- End List Content-->    
                            </div>

                        </div>
                    </div>
                </div>
            </a4j:form>
        </f:view>
    </body>
</html>
<script type="text/javascript">
    $j(document).ready(function(){
        yhight = ($j('.popup').height()-90)+"px" ;
        $j('.main_content').css('height',yhight );
        $j('.popup-content').css('height',yhight );
    });
</script>